#ifndef DYNAMICLARGELISTMODEL_H
#define DYNAMICLARGELISTMODEL_H

#include <QAbstractListModel>
#include <QVector>
#include <QHash>

class DynamicLargeListModel : public QAbstractListModel
{
    Q_OBJECT

public:
    explicit DynamicLargeListModel(QObject *parent = 0);

    void addItem(const QString& title);

    // Basic functionality:
    int rowCount(const QModelIndex &parent = QModelIndex()) const override;

    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;

private:
    int itemCount = 0;
    mutable QHash<int, bool> checkedItems;
    QVector<QString> titles;

};

#endif // DYNAMICLARGELISTMODEL_H
